﻿using System;
using System.Collections.Generic;
using System.Text;

namespace project_assess.read_excel
{
    public class project
    {
        public DateTime date;//测算日期
        public string prjid;//项目编号
        public string prjname;//项目名称
        public double contract;//合同额
        public string address;//地址 
        public string manager;//项目经理
        public string leader;//班组长
        public string manufacture;//采购厂商   
        public string type;//监测类型
        public double survey_no;//监测次数
        public double work_ratio;//工作量系数
        //
        public double support_no;//支撑数
        public double envi_complicate;//环境复杂
        public double operate_method;//施作方式
        //
        public double prj_ratio;//工程综合系数
        //
        public double region_ratio;//地域系数
        public double complicate_ratio;//复杂系数
        public double survey_type_ratio;//监测类型系数
        public double team_ratio;//班组折减率系数
        public double scale_ratio;//规模效应递减系数
        //
        public double manu_ratio;//采购系数
        //public List<material_item> items = new List<material_item>();
        public List<item_content> contents = new List<item_content>();
        public List<work_item> works = new List<work_item>();

        public double material_sum;//采购费
        public double bury_sum;//埋设费
        public double material_bury;
        public double work_sum;//核定工作量
    }

    public class material_item
    {
        public string method;
        public int number;
        public double material_price;
        public double bury_price;
        public double material_total;
        public double bury_total;
    }

    public class item_content
    {
        public List<material_item> items = new List<material_item>();
        public double parameters;
        public string name;
        public int getsum()
        {
            double sum = 0;
            for (int i = 0; i < items.Count; i++)
            {
                sum += items[i].number;
            }
            if (parameters > 0)
            {
                sum = sum / parameters;
            }
            return (int)Math.Floor(sum);
        }
    }

    public class work_item
    {
        public string content;
        public double number;
        public double price;
        public double price_total;
        public double predict;
        public double sum;
    }

}
